package com.ruoyi.web.controller.system;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.controller.tool.OcrUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ocr")
public class OcrAndAsrController {

    @GetMapping("/getText")
    public AjaxResult wenzishibie()
    {
        AjaxResult ajax = AjaxResult.success();
        String result = OcrUtils.doPostOrGet("http://127.0.0.1:5000/getText","");
        ajax.put("text",result);
        return ajax;
    }
}
